<% @device.actions.each do |action| %>
  <%  fields_for @device do |device_form|%>
    var action = "<%= generate_template(device_form, :actions, :partial => "actions/actions_new_fieldset_form", :object => action.clone) %>";

    $("#div_clear_actions").before(action.replace(/NEW_RECORD/g, new Date().getTime())).prev("div").highlightMe();    
  <%  end %>
<% end %>